package com.yidu.ladder.delivery.dao;

import java.util.List;

import com.yidu.ladder.base.domain.Staff;
import com.yidu.ladder.base.domain.Subarea;
import com.yidu.ladder.delivery.domain.BusinessRecsipt;
import com.yidu.ladder.delivery.domain.BusinessRecsiptVo;
import com.yidu.ladder.delivery.domain.Workorder;
import com.yidu.ladder.system.domain.Customer;


/**
 * 业务受理单数据访问层
 * @author lw
 * @since 2020/1/10
 */
public interface BusinessRecsiptDao {
	
	/**
	  * 查询所有带条件分页
	 * @param businessRecsiptVo
	 * @return
	 */
	public List<BusinessRecsipt> findAllBusinessRecsiptWithPage(BusinessRecsiptVo businessRecsiptVo);
	
	/**
	 * 计数
	 * @param businessRecsiptVo
	 * @return
	 */
	public int countBusinessRecsipt(BusinessRecsiptVo businessRecsiptVo);
	
	/**
	 * 查询当前日期
	 * @param date 日期
	 * @return 查询的数量
	 */
	public int dateBusinessSizeQuery(String date);
	
	/**
	 * 根据电话号码查询客户
	 * @param customerPhone
	 * @return
	 */
	public Customer findCustomerByCustomerPhone(String customerPhone);
	
	/**
	 * 添加业务受理单
	 * @param businessRecsipt
	 * @return
	 */
	public int addBusinessRecsipt(BusinessRecsipt businessRecsipt);
	
	/**
	 * 添加派工单
	 * @param workorder
	 * @return
	 */
	public int addWorkorder(Workorder workorder);
	
	/**
	 * 根据编码查询分区
	 * @param mnemoniCode
	 * @return
	 */
	public Subarea findCityCodeByQuery(String mnemoniCode);
	
	/**
	 * 根据定区Id查询该定区下的职员
	 * @param ripAreaId 定区Id
	 * @return 符合条件的职员
	 */
	public List<Staff> findStaffByRipAreaIdQuery(String ripAreaId);
	
	/**
	 * 根据受理单Id修改状态
	 * @param businessRecsiptId
	 * @return
	 */
	public boolean updateOrderTypeByBusinessRecsiptId(String businessRecsiptId);
	/**
	 * 根据职员名查找职员
	 * @param staffName 职员名
	 * @return 职员对象
	 */
	public Staff findStaffByName(String staffName);
}
